from typing import List


class Solution:
    def rotate(self, nums: List[int], k: int) -> None:
        n = len(nums)
        new_nums = nums.copy()
        for i in range(0, n):
            index = (i + k) % n
            nums[index] = new_nums[i]

    def rotate1(self, nums: List[int], k: int) -> None:
        def swap(a, b):
            a, b = b, a

        n = len(nums)
        start = 0
        count = 0
        while start < n:
            temp = nums[start]
            p = start
            while True:
                print(1111)
                if p == start:
                    break
            start += 1


if __name__ == '__main__':
    nums = [1, 2, 3, 4, 5, 6, 7]
    k = 2
    s = Solution()
    s.rotate1(nums, k)
